package com.baidu.mobstat;

import android.content.Context;
import com.baidu.mobstat.a.a;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

class b
{
  private static String a = "Android";
  private static JSONObject q = new JSONObject();
  private static b w = new b();
  private String b;
  private String c = null;
  private int d = -1;
  private String e;
  private String f;
  private int g;
  private int h;
  private String i = null;
  private String j;
  private String k;
  private String l;
  private String m;
  private String n;
  private String o;
  private int p = 0;
  private JSONArray r = new JSONArray();
  private JSONArray s = new JSONArray();
  private JSONArray t = new JSONArray();
  private JSONArray u = new JSONArray();
  private boolean v = false;

  public static b a()
  {
    return w;
  }

  private String a(String paramString, Context paramContext)
  {
    if (paramString.equals("000000000000000"))
    {
      String str = q.g(paramContext);
      if (str != null)
      {
        str = str.replaceAll(":", "");
        paramString = str;
      }
      com.baidu.mobstat.a.b.a("stat", "imei=null,mac=" + str);
    }
    return paramString;
  }

  private void a(boolean paramBoolean)
  {
    this.v = paramBoolean;
  }

  private boolean d()
  {
    return this.v;
  }

  public void a(long paramLong, String paramString)
  {
    JSONObject localJSONObject = new JSONObject();
    try
    {
      localJSONObject.put("t", paramLong);
      localJSONObject.put("c", paramString);
      c(localJSONObject, false);
      return;
    }
    catch (JSONException localJSONException)
    {
      com.baidu.mobstat.a.b.a("stat", localJSONException);
    }
  }

  // ERROR //
  public void a(Context paramContext)
  {
    // Byte code:
    //   0: aload_0
    //   1: monitorenter
    //   2: aload_0
    //   3: getfield 54	com/baidu/mobstat/b:d	I
    //   6: istore_3
    //   7: iload_3
    //   8: iconst_m1
    //   9: if_icmpeq +6 -> 15
    //   12: aload_0
    //   13: monitorexit
    //   14: return
    //   15: aload_1
    //   16: ldc 139
    //   18: invokestatic 144	com/baidu/mobstat/a/a:d	(Landroid/content/Context;Ljava/lang/String;)V
    //   21: aload_1
    //   22: ldc 146
    //   24: invokestatic 144	com/baidu/mobstat/a/a:d	(Landroid/content/Context;Ljava/lang/String;)V
    //   27: aload_1
    //   28: ldc 148
    //   30: invokestatic 144	com/baidu/mobstat/a/a:d	(Landroid/content/Context;Ljava/lang/String;)V
    //   33: aload_1
    //   34: ldc 150
    //   36: invokevirtual 156	android/content/Context:getSystemService	(Ljava/lang/String;)Ljava/lang/Object;
    //   39: checkcast 158	android/telephony/TelephonyManager
    //   42: astore 4
    //   44: aload_0
    //   45: getstatic 163	android/os/Build$VERSION:SDK	Ljava/lang/String;
    //   48: putfield 165	com/baidu/mobstat/b:b	Ljava/lang/String;
    //   51: aload_0
    //   52: getstatic 170	android/os/Build:MODEL	Ljava/lang/String;
    //   55: putfield 172	com/baidu/mobstat/b:k	Ljava/lang/String;
    //   58: aload_0
    //   59: aload 4
    //   61: invokevirtual 175	android/telephony/TelephonyManager:getDeviceId	()Ljava/lang/String;
    //   64: putfield 177	com/baidu/mobstat/b:f	Ljava/lang/String;
    //   67: aload_0
    //   68: aload_0
    //   69: aload_0
    //   70: getfield 177	com/baidu/mobstat/b:f	Ljava/lang/String;
    //   73: aload_1
    //   74: invokespecial 179	com/baidu/mobstat/b:a	(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;
    //   77: putfield 177	com/baidu/mobstat/b:f	Ljava/lang/String;
    //   80: aload_0
    //   81: aload 4
    //   83: invokevirtual 182	android/telephony/TelephonyManager:getNetworkOperator	()Ljava/lang/String;
    //   86: putfield 184	com/baidu/mobstat/b:j	Ljava/lang/String;
    //   89: aload_0
    //   90: aload_1
    //   91: invokestatic 187	com/baidu/mobstat/q:a	(Landroid/content/Context;)I
    //   94: putfield 189	com/baidu/mobstat/b:g	I
    //   97: aload_0
    //   98: aload_1
    //   99: invokestatic 191	com/baidu/mobstat/q:b	(Landroid/content/Context;)I
    //   102: putfield 193	com/baidu/mobstat/b:h	I
    //   105: aload_1
    //   106: invokevirtual 197	android/content/Context:getResources	()Landroid/content/res/Resources;
    //   109: invokevirtual 203	android/content/res/Resources:getConfiguration	()Landroid/content/res/Configuration;
    //   112: getfield 208	android/content/res/Configuration:orientation	I
    //   115: iconst_2
    //   116: if_icmpne +50 -> 166
    //   119: ldc 96
    //   121: ldc 210
    //   123: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   126: pop
    //   127: aload_0
    //   128: aload_0
    //   129: getfield 189	com/baidu/mobstat/b:g	I
    //   132: aload_0
    //   133: getfield 193	com/baidu/mobstat/b:h	I
    //   136: ixor
    //   137: putfield 189	com/baidu/mobstat/b:g	I
    //   140: aload_0
    //   141: aload_0
    //   142: getfield 189	com/baidu/mobstat/b:g	I
    //   145: aload_0
    //   146: getfield 193	com/baidu/mobstat/b:h	I
    //   149: ixor
    //   150: putfield 193	com/baidu/mobstat/b:h	I
    //   153: aload_0
    //   154: aload_0
    //   155: getfield 189	com/baidu/mobstat/b:g	I
    //   158: aload_0
    //   159: getfield 193	com/baidu/mobstat/b:h	I
    //   162: ixor
    //   163: putfield 189	com/baidu/mobstat/b:g	I
    //   166: aload_0
    //   167: getfield 56	com/baidu/mobstat/b:i	Ljava/lang/String;
    //   170: ifnonnull +13 -> 183
    //   173: aload_0
    //   174: aload_1
    //   175: ldc 212
    //   177: invokestatic 215	com/baidu/mobstat/q:a	(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
    //   180: putfield 56	com/baidu/mobstat/b:i	Ljava/lang/String;
    //   183: aload_0
    //   184: getfield 52	com/baidu/mobstat/b:c	Ljava/lang/String;
    //   187: ifnonnull +13 -> 200
    //   190: aload_0
    //   191: aload_1
    //   192: ldc 217
    //   194: invokestatic 215	com/baidu/mobstat/q:a	(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
    //   197: putfield 52	com/baidu/mobstat/b:c	Ljava/lang/String;
    //   200: aload_0
    //   201: aload_1
    //   202: invokestatic 219	com/baidu/mobstat/q:c	(Landroid/content/Context;)I
    //   205: putfield 54	com/baidu/mobstat/b:d	I
    //   208: aload_0
    //   209: aload_1
    //   210: invokestatic 221	com/baidu/mobstat/q:d	(Landroid/content/Context;)Ljava/lang/String;
    //   213: putfield 223	com/baidu/mobstat/b:e	Ljava/lang/String;
    //   216: aload_1
    //   217: ldc 225
    //   219: invokestatic 215	com/baidu/mobstat/q:a	(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
    //   222: astore 23
    //   224: aload 23
    //   226: ifnull +120 -> 346
    //   229: aload 23
    //   231: invokevirtual 228	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   234: ldc 230
    //   236: invokevirtual 81	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   239: ifeq +107 -> 346
    //   242: aload_0
    //   243: ldc 232
    //   245: putfield 234	com/baidu/mobstat/b:l	Ljava/lang/String;
    //   248: aload_0
    //   249: aload_1
    //   250: invokestatic 236	com/baidu/mobstat/q:f	(Landroid/content/Context;)Ljava/lang/String;
    //   253: putfield 238	com/baidu/mobstat/b:m	Ljava/lang/String;
    //   256: aload_0
    //   257: aload_1
    //   258: invokestatic 240	com/baidu/mobstat/q:h	(Landroid/content/Context;)Ljava/lang/String;
    //   261: putfield 242	com/baidu/mobstat/b:n	Ljava/lang/String;
    //   264: aload_0
    //   265: aload_1
    //   266: invokestatic 244	com/baidu/mobstat/q:i	(Landroid/content/Context;)Ljava/lang/String;
    //   269: putfield 246	com/baidu/mobstat/b:o	Ljava/lang/String;
    //   272: goto -260 -> 12
    //   275: astore 21
    //   277: aload 21
    //   279: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   282: pop
    //   283: goto -271 -> 12
    //   286: astore_2
    //   287: aload_0
    //   288: monitorexit
    //   289: aload_2
    //   290: athrow
    //   291: astore 5
    //   293: aload 5
    //   295: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   298: pop
    //   299: goto -219 -> 80
    //   302: astore 7
    //   304: aload 7
    //   306: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   309: pop
    //   310: goto -221 -> 89
    //   313: astore 9
    //   315: aload 9
    //   317: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   320: pop
    //   321: goto -155 -> 166
    //   324: astore 11
    //   326: aload 11
    //   328: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   331: pop
    //   332: goto -149 -> 183
    //   335: astore 13
    //   337: aload 13
    //   339: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   342: pop
    //   343: goto -127 -> 216
    //   346: aload_0
    //   347: aload_1
    //   348: invokestatic 251	com/baidu/mobstat/q:e	(Landroid/content/Context;)Ljava/lang/String;
    //   351: putfield 234	com/baidu/mobstat/b:l	Ljava/lang/String;
    //   354: goto -106 -> 248
    //   357: astore 15
    //   359: aload 15
    //   361: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   364: pop
    //   365: goto -117 -> 248
    //   368: astore 17
    //   370: aload 17
    //   372: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   375: pop
    //   376: goto -120 -> 256
    //   379: astore 19
    //   381: aload 19
    //   383: invokestatic 249	com/baidu/mobstat/a/b:a	(Ljava/lang/Throwable;)I
    //   386: pop
    //   387: goto -123 -> 264
    //
    // Exception table:
    //   from	to	target	type
    //   264	272	275	java/lang/Exception
    //   2	7	286	finally
    //   15	58	286	finally
    //   58	80	286	finally
    //   80	89	286	finally
    //   89	166	286	finally
    //   166	183	286	finally
    //   183	200	286	finally
    //   200	216	286	finally
    //   216	224	286	finally
    //   229	248	286	finally
    //   248	256	286	finally
    //   256	264	286	finally
    //   264	272	286	finally
    //   277	283	286	finally
    //   293	299	286	finally
    //   304	310	286	finally
    //   315	321	286	finally
    //   326	332	286	finally
    //   337	343	286	finally
    //   346	354	286	finally
    //   359	365	286	finally
    //   370	376	286	finally
    //   381	387	286	finally
    //   58	80	291	java/lang/Exception
    //   80	89	302	java/lang/Exception
    //   89	166	313	java/lang/Exception
    //   166	183	324	java/lang/Exception
    //   200	216	335	java/lang/Exception
    //   216	224	357	java/lang/Exception
    //   229	248	357	java/lang/Exception
    //   346	354	357	java/lang/Exception
    //   248	256	368	java/lang/Exception
    //   256	264	379	java/lang/Exception
  }

  // ERROR //
  public void a(Context paramContext, boolean paramBoolean)
  {
    // Byte code:
    //   0: ldc 96
    //   2: ldc 254
    //   4: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   7: pop
    //   8: iload_2
    //   9: ifeq +41 -> 50
    //   12: aload_1
    //   13: ldc_w 256
    //   16: invokevirtual 156	android/content/Context:getSystemService	(Ljava/lang/String;)Ljava/lang/Object;
    //   19: checkcast 258	android/net/wifi/WifiManager
    //   22: invokevirtual 261	android/net/wifi/WifiManager:isWifiEnabled	()Z
    //   25: ifne +25 -> 50
    //   28: ldc 96
    //   30: ldc_w 263
    //   33: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   36: pop
    //   37: return
    //   38: astore 36
    //   40: ldc 96
    //   42: ldc_w 265
    //   45: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   48: pop
    //   49: return
    //   50: new 41	org/json/JSONObject
    //   53: dup
    //   54: invokespecial 44	org/json/JSONObject:<init>	()V
    //   57: astore 4
    //   59: getstatic 46	com/baidu/mobstat/b:q	Lorg/json/JSONObject;
    //   62: astore 5
    //   64: aload 5
    //   66: monitorenter
    //   67: getstatic 46	com/baidu/mobstat/b:q	Lorg/json/JSONObject;
    //   70: ldc 120
    //   72: invokestatic 271	java/lang/System:currentTimeMillis	()J
    //   75: invokevirtual 124	org/json/JSONObject:put	(Ljava/lang/String;J)Lorg/json/JSONObject;
    //   78: pop
    //   79: getstatic 46	com/baidu/mobstat/b:q	Lorg/json/JSONObject;
    //   82: ldc_w 273
    //   85: invokestatic 278	com/baidu/mobstat/m:a	()Lcom/baidu/mobstat/m;
    //   88: invokevirtual 280	com/baidu/mobstat/m:c	()J
    //   91: invokevirtual 124	org/json/JSONObject:put	(Ljava/lang/String;J)Lorg/json/JSONObject;
    //   94: pop
    //   95: aload 4
    //   97: ldc_w 282
    //   100: getstatic 46	com/baidu/mobstat/b:q	Lorg/json/JSONObject;
    //   103: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   106: pop
    //   107: aload_0
    //   108: getfield 63	com/baidu/mobstat/b:r	Lorg/json/JSONArray;
    //   111: astore 12
    //   113: aload 12
    //   115: monitorenter
    //   116: aload 4
    //   118: ldc_w 284
    //   121: aload_0
    //   122: getfield 63	com/baidu/mobstat/b:r	Lorg/json/JSONArray;
    //   125: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   128: pop
    //   129: aload_0
    //   130: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   133: astore 17
    //   135: aload 17
    //   137: monitorenter
    //   138: aload 4
    //   140: ldc_w 286
    //   143: aload_0
    //   144: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   147: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   150: pop
    //   151: aload_0
    //   152: getfield 67	com/baidu/mobstat/b:t	Lorg/json/JSONArray;
    //   155: astore 22
    //   157: aload 22
    //   159: monitorenter
    //   160: aload_0
    //   161: getfield 69	com/baidu/mobstat/b:u	Lorg/json/JSONArray;
    //   164: astore 24
    //   166: aload 24
    //   168: monitorenter
    //   169: aload 4
    //   171: ldc_w 288
    //   174: aload_0
    //   175: getfield 69	com/baidu/mobstat/b:u	Lorg/json/JSONArray;
    //   178: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   181: pop
    //   182: aload 4
    //   184: invokevirtual 289	org/json/JSONObject:toString	()Ljava/lang/String;
    //   187: astore 29
    //   189: ldc 96
    //   191: new 98	java/lang/StringBuilder
    //   194: dup
    //   195: invokespecial 99	java/lang/StringBuilder:<init>	()V
    //   198: ldc_w 291
    //   201: invokevirtual 105	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   204: aload 29
    //   206: invokevirtual 105	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   209: invokevirtual 109	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   212: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   215: pop
    //   216: aload_1
    //   217: ldc_w 293
    //   220: aload 29
    //   222: ldc_w 294
    //   225: ldc_w 294
    //   228: invokestatic 297	com/baidu/mobstat/q:a	(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String;
    //   231: pop
    //   232: iconst_1
    //   233: istore 33
    //   235: iload 33
    //   237: ifeq +59 -> 296
    //   240: aload_0
    //   241: iconst_0
    //   242: invokespecial 299	com/baidu/mobstat/b:a	(Z)V
    //   245: aload_0
    //   246: new 60	org/json/JSONArray
    //   249: dup
    //   250: invokespecial 61	org/json/JSONArray:<init>	()V
    //   253: putfield 69	com/baidu/mobstat/b:u	Lorg/json/JSONArray;
    //   256: aload_0
    //   257: new 60	org/json/JSONArray
    //   260: dup
    //   261: invokespecial 61	org/json/JSONArray:<init>	()V
    //   264: putfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   267: aload_0
    //   268: new 60	org/json/JSONArray
    //   271: dup
    //   272: invokespecial 61	org/json/JSONArray:<init>	()V
    //   275: putfield 63	com/baidu/mobstat/b:r	Lorg/json/JSONArray;
    //   278: aload_0
    //   279: aload_1
    //   280: invokevirtual 301	com/baidu/mobstat/b:b	(Landroid/content/Context;)V
    //   283: invokestatic 278	com/baidu/mobstat/m:a	()Lcom/baidu/mobstat/m;
    //   286: invokevirtual 303	com/baidu/mobstat/m:b	()V
    //   289: invokestatic 308	com/baidu/mobstat/g:a	()Lcom/baidu/mobstat/g;
    //   292: aload_1
    //   293: invokevirtual 310	com/baidu/mobstat/g:d	(Landroid/content/Context;)V
    //   296: aload 24
    //   298: monitorexit
    //   299: aload 22
    //   301: monitorexit
    //   302: aload 17
    //   304: monitorexit
    //   305: aload 12
    //   307: monitorexit
    //   308: aload 5
    //   310: monitorexit
    //   311: ldc 96
    //   313: ldc_w 312
    //   316: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   319: pop
    //   320: return
    //   321: astore 7
    //   323: ldc 96
    //   325: aload 7
    //   327: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   330: pop
    //   331: aload 5
    //   333: monitorexit
    //   334: return
    //   335: astore 6
    //   337: aload 5
    //   339: monitorexit
    //   340: aload 6
    //   342: athrow
    //   343: astore 14
    //   345: ldc 96
    //   347: aload 14
    //   349: invokevirtual 313	org/json/JSONException:toString	()Ljava/lang/String;
    //   352: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   355: pop
    //   356: aload 12
    //   358: monitorexit
    //   359: aload 5
    //   361: monitorexit
    //   362: return
    //   363: astore 19
    //   365: ldc 96
    //   367: aload 19
    //   369: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   372: pop
    //   373: aload 17
    //   375: monitorexit
    //   376: aload 12
    //   378: monitorexit
    //   379: aload 5
    //   381: monitorexit
    //   382: return
    //   383: astore 26
    //   385: ldc 96
    //   387: aload 26
    //   389: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   392: pop
    //   393: aload 24
    //   395: monitorexit
    //   396: aload 22
    //   398: monitorexit
    //   399: aload 17
    //   401: monitorexit
    //   402: aload 12
    //   404: monitorexit
    //   405: aload 5
    //   407: monitorexit
    //   408: return
    //   409: astore 31
    //   411: ldc 96
    //   413: aload 31
    //   415: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   418: pop
    //   419: iconst_0
    //   420: istore 33
    //   422: goto -187 -> 235
    //   425: astore 25
    //   427: aload 24
    //   429: monitorexit
    //   430: aload 25
    //   432: athrow
    //   433: astore 23
    //   435: aload 22
    //   437: monitorexit
    //   438: aload 23
    //   440: athrow
    //   441: astore 18
    //   443: aload 17
    //   445: monitorexit
    //   446: aload 18
    //   448: athrow
    //   449: astore 13
    //   451: aload 12
    //   453: monitorexit
    //   454: aload 13
    //   456: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   12	37	38	java/lang/Exception
    //   67	107	321	org/json/JSONException
    //   67	107	335	finally
    //   107	116	335	finally
    //   308	311	335	finally
    //   323	334	335	finally
    //   337	340	335	finally
    //   359	362	335	finally
    //   379	382	335	finally
    //   405	408	335	finally
    //   454	457	335	finally
    //   116	129	343	org/json/JSONException
    //   138	151	363	org/json/JSONException
    //   169	182	383	org/json/JSONException
    //   216	232	409	java/lang/Exception
    //   169	182	425	finally
    //   182	216	425	finally
    //   216	232	425	finally
    //   240	296	425	finally
    //   296	299	425	finally
    //   385	396	425	finally
    //   411	419	425	finally
    //   427	430	425	finally
    //   160	169	433	finally
    //   299	302	433	finally
    //   396	399	433	finally
    //   430	433	433	finally
    //   435	438	433	finally
    //   138	151	441	finally
    //   151	160	441	finally
    //   302	305	441	finally
    //   365	376	441	finally
    //   399	402	441	finally
    //   438	441	441	finally
    //   443	446	441	finally
    //   116	129	449	finally
    //   129	138	449	finally
    //   305	308	449	finally
    //   345	359	449	finally
    //   376	379	449	finally
    //   402	405	449	finally
    //   446	449	449	finally
    //   451	454	449	finally
  }

  public void a(String paramString)
  {
    this.c = paramString;
  }

  public void a(String paramString1, String paramString2, int paramInt, long paramLong)
  {
    JSONObject localJSONObject = new JSONObject();
    try
    {
      localJSONObject.put("i", paramString1);
      localJSONObject.put("l", paramString2);
      localJSONObject.put("c", paramInt);
      localJSONObject.put("t", paramLong);
      b(localJSONObject, false);
      com.baidu.mobstat.a.b.a("stat", "put event:" + localJSONObject.toString());
      return;
    }
    catch (JSONException localJSONException)
    {
      com.baidu.mobstat.a.b.a("stat", localJSONException);
    }
  }

  public void a(JSONObject paramJSONObject, boolean paramBoolean)
  {
    if ((paramJSONObject != null) && (!paramBoolean))
    {
      int i2 = paramJSONObject.toString().getBytes().length;
      Object[] arrayOfObject = new Object[3];
      arrayOfObject[0] = "stat";
      arrayOfObject[1] = "putSession:addSize is:";
      arrayOfObject[2] = Integer.valueOf(i2);
      com.baidu.mobstat.a.b.a(arrayOfObject);
      if (i2 + this.p > 204800)
      {
        com.baidu.mobstat.a.b.a("stat", "putSession: size is full!");
        return;
      }
    }
    int i1;
    synchronized (this.r)
    {
      i1 = this.r.length();
    }
    try
    {
      this.r.put(i1, paramJSONObject);
      monitorexit;
      return;
      localObject = finally;
      monitorexit;
      throw localObject;
    }
    catch (JSONException localJSONException)
    {
      com.baidu.mobstat.a.b.a("stat", localJSONException);
    }
  }

  public void b()
  {
    monitorenter;
    while (true)
    {
      try
      {
        int i1 = q.length();
        if (i1 > 0);
        while (true)
        {
          monitorexit;
          try
          {
            JSONObject localJSONObject1 = q;
            if (a != null)
              break label444;
            str1 = "";
            localJSONObject1.put("o", str1);
            JSONObject localJSONObject2 = q;
            if (this.b != null)
              break label452;
            str2 = "";
            localJSONObject2.put("s", str2);
            JSONObject localJSONObject3 = q;
            if (this.c != null)
              break label461;
            str3 = "";
            localJSONObject3.put("k", str3);
            q.put("v", "2.2");
            q.put("a", this.d);
            JSONObject localJSONObject4 = q;
            if (this.e != null)
              break label470;
            str4 = "";
            localJSONObject4.put("n", str4);
            JSONObject localJSONObject5 = q;
            if (this.f != null)
              break label479;
            str5 = "";
            localJSONObject5.put("d", str5);
            q.put("w", this.g);
            q.put("h", this.h);
            JSONObject localJSONObject6 = q;
            if (this.i != null)
              break label488;
            str6 = "";
            localJSONObject6.put("c", str6);
            JSONObject localJSONObject7 = q;
            if (this.j != null)
              break label497;
            str7 = "";
            localJSONObject7.put("op", str7);
            JSONObject localJSONObject8 = q;
            if (this.k != null)
              break label506;
            str8 = "";
            localJSONObject8.put("m", str8);
            q.put("cl", this.l);
            JSONObject localJSONObject9 = q;
            if (this.m != null)
              break label515;
            str9 = "";
            localJSONObject9.put("gl", str9);
            JSONObject localJSONObject10 = q;
            if (this.n != null)
              break label524;
            str10 = "";
            localJSONObject10.put("wl", str10);
            JSONObject localJSONObject11 = q;
            if (this.o != null)
              break label533;
            str11 = "";
            localJSONObject11.put("l", str11);
            q.put("t", System.currentTimeMillis());
            q.put("sq", 0);
            com.baidu.mobstat.a.b.a("stat", q.toString());
          }
          catch (JSONException localJSONException)
          {
            com.baidu.mobstat.a.b.a("stat", "header ini error");
            throw new RuntimeException("header ini error");
          }
        }
      }
      finally
      {
        monitorexit;
      }
      label444: String str1 = a;
      continue;
      label452: String str2 = this.b;
      continue;
      label461: String str3 = this.c;
      continue;
      label470: String str4 = this.e;
      continue;
      label479: String str5 = this.f;
      continue;
      label488: String str6 = this.i;
      continue;
      label497: String str7 = this.j;
      continue;
      label506: String str8 = this.k;
      continue;
      label515: String str9 = this.m;
      continue;
      label524: String str10 = this.n;
      continue;
      label533: String str11 = this.o;
    }
  }

  // ERROR //
  public void b(Context paramContext)
  {
    // Byte code:
    //   0: ldc 96
    //   2: ldc_w 380
    //   5: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   8: pop
    //   9: new 41	org/json/JSONObject
    //   12: dup
    //   13: invokespecial 44	org/json/JSONObject:<init>	()V
    //   16: astore_3
    //   17: aload_0
    //   18: getfield 63	com/baidu/mobstat/b:r	Lorg/json/JSONArray;
    //   21: astore 10
    //   23: aload 10
    //   25: monitorenter
    //   26: aload_3
    //   27: ldc_w 284
    //   30: new 60	org/json/JSONArray
    //   33: dup
    //   34: aload_0
    //   35: getfield 63	com/baidu/mobstat/b:r	Lorg/json/JSONArray;
    //   38: invokevirtual 381	org/json/JSONArray:toString	()Ljava/lang/String;
    //   41: invokespecial 382	org/json/JSONArray:<init>	(Ljava/lang/String;)V
    //   44: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   47: pop
    //   48: aload 10
    //   50: monitorexit
    //   51: aload_0
    //   52: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   55: astore 13
    //   57: aload 13
    //   59: monitorenter
    //   60: aload_3
    //   61: ldc_w 286
    //   64: new 60	org/json/JSONArray
    //   67: dup
    //   68: aload_0
    //   69: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   72: invokevirtual 381	org/json/JSONArray:toString	()Ljava/lang/String;
    //   75: invokespecial 382	org/json/JSONArray:<init>	(Ljava/lang/String;)V
    //   78: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   81: pop
    //   82: aload 13
    //   84: monitorexit
    //   85: aload_0
    //   86: getfield 69	com/baidu/mobstat/b:u	Lorg/json/JSONArray;
    //   89: astore 16
    //   91: aload 16
    //   93: monitorenter
    //   94: aload_3
    //   95: ldc_w 288
    //   98: new 60	org/json/JSONArray
    //   101: dup
    //   102: aload_0
    //   103: getfield 69	com/baidu/mobstat/b:u	Lorg/json/JSONArray;
    //   106: invokevirtual 381	org/json/JSONArray:toString	()Ljava/lang/String;
    //   109: invokespecial 382	org/json/JSONArray:<init>	(Ljava/lang/String;)V
    //   112: invokevirtual 128	org/json/JSONObject:put	(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    //   115: pop
    //   116: aload 16
    //   118: monitorexit
    //   119: aload_3
    //   120: invokevirtual 289	org/json/JSONObject:toString	()Ljava/lang/String;
    //   123: astore 6
    //   125: aload_0
    //   126: invokespecial 384	com/baidu/mobstat/b:d	()Z
    //   129: ifeq +51 -> 180
    //   132: ldc 96
    //   134: ldc_w 386
    //   137: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   140: pop
    //   141: return
    //   142: astore 11
    //   144: aload 10
    //   146: monitorexit
    //   147: aload 11
    //   149: athrow
    //   150: astore 4
    //   152: ldc 96
    //   154: ldc_w 388
    //   157: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   160: pop
    //   161: goto -42 -> 119
    //   164: astore 14
    //   166: aload 13
    //   168: monitorexit
    //   169: aload 14
    //   171: athrow
    //   172: astore 17
    //   174: aload 16
    //   176: monitorexit
    //   177: aload 17
    //   179: athrow
    //   180: aload 6
    //   182: invokevirtual 328	java/lang/String:getBytes	()[B
    //   185: arraylength
    //   186: istore 7
    //   188: iload 7
    //   190: ldc_w 340
    //   193: if_icmplt +9 -> 202
    //   196: aload_0
    //   197: iconst_1
    //   198: invokespecial 299	com/baidu/mobstat/b:a	(Z)V
    //   201: return
    //   202: aload_0
    //   203: iload 7
    //   205: putfield 58	com/baidu/mobstat/b:p	I
    //   208: ldc 96
    //   210: new 98	java/lang/StringBuilder
    //   213: dup
    //   214: invokespecial 99	java/lang/StringBuilder:<init>	()V
    //   217: ldc_w 390
    //   220: invokevirtual 105	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   223: aload_0
    //   224: getfield 58	com/baidu/mobstat/b:p	I
    //   227: invokevirtual 393	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   230: invokevirtual 109	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   233: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   236: pop
    //   237: iconst_0
    //   238: aload_1
    //   239: ldc_w 395
    //   242: aload 6
    //   244: iconst_0
    //   245: invokestatic 398	com/baidu/mobstat/a/a:a	(ZLandroid/content/Context;Ljava/lang/String;Ljava/lang/String;Z)V
    //   248: return
    //
    // Exception table:
    //   from	to	target	type
    //   26	51	142	finally
    //   144	147	142	finally
    //   17	26	150	org/json/JSONException
    //   51	60	150	org/json/JSONException
    //   85	94	150	org/json/JSONException
    //   147	150	150	org/json/JSONException
    //   169	172	150	org/json/JSONException
    //   177	180	150	org/json/JSONException
    //   60	85	164	finally
    //   166	169	164	finally
    //   94	119	172	finally
    //   174	177	172	finally
  }

  public void b(String paramString)
  {
    this.i = paramString;
  }

  // ERROR //
  public void b(JSONObject paramJSONObject, boolean paramBoolean)
  {
    // Byte code:
    //   0: aload_1
    //   1: ifnull +74 -> 75
    //   4: iload_2
    //   5: ifne +70 -> 75
    //   8: aload_1
    //   9: invokevirtual 289	org/json/JSONObject:toString	()Ljava/lang/String;
    //   12: invokevirtual 328	java/lang/String:getBytes	()[B
    //   15: arraylength
    //   16: istore 30
    //   18: iconst_3
    //   19: anewarray 4	java/lang/Object
    //   22: astore 31
    //   24: aload 31
    //   26: iconst_0
    //   27: ldc 96
    //   29: aastore
    //   30: aload 31
    //   32: iconst_1
    //   33: ldc_w 400
    //   36: aastore
    //   37: aload 31
    //   39: iconst_2
    //   40: iload 30
    //   42: invokestatic 336	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   45: aastore
    //   46: aload 31
    //   48: invokestatic 339	com/baidu/mobstat/a/b:a	([Ljava/lang/Object;)I
    //   51: pop
    //   52: iload 30
    //   54: aload_0
    //   55: getfield 58	com/baidu/mobstat/b:p	I
    //   58: iadd
    //   59: ldc_w 340
    //   62: if_icmple +13 -> 75
    //   65: ldc 96
    //   67: ldc_w 402
    //   70: invokestatic 114	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/String;)I
    //   73: pop
    //   74: return
    //   75: aload_1
    //   76: ldc_w 316
    //   79: invokevirtual 406	org/json/JSONObject:getString	(Ljava/lang/String;)Ljava/lang/String;
    //   82: astore 5
    //   84: aload_1
    //   85: ldc_w 317
    //   88: invokevirtual 406	org/json/JSONObject:getString	(Ljava/lang/String;)Ljava/lang/String;
    //   91: astore 6
    //   93: aload_1
    //   94: ldc 120
    //   96: invokevirtual 410	org/json/JSONObject:getLong	(Ljava/lang/String;)J
    //   99: ldc2_w 411
    //   102: ldiv
    //   103: lstore 7
    //   105: aload_0
    //   106: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   109: astore 9
    //   111: aload 9
    //   113: monitorenter
    //   114: aload_0
    //   115: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   118: invokevirtual 346	org/json/JSONArray:length	()I
    //   121: istore 11
    //   123: iconst_0
    //   124: istore 12
    //   126: iload 11
    //   128: istore 13
    //   130: iload 12
    //   132: iload 11
    //   134: if_icmpge +160 -> 294
    //   137: aload_0
    //   138: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   141: iload 12
    //   143: invokevirtual 416	org/json/JSONArray:getJSONObject	(I)Lorg/json/JSONObject;
    //   146: astore 19
    //   148: aload 19
    //   150: ldc_w 316
    //   153: invokevirtual 406	org/json/JSONObject:getString	(Ljava/lang/String;)Ljava/lang/String;
    //   156: astore 20
    //   158: aload 19
    //   160: ldc_w 317
    //   163: invokevirtual 406	org/json/JSONObject:getString	(Ljava/lang/String;)Ljava/lang/String;
    //   166: astore 21
    //   168: aload 19
    //   170: ldc 120
    //   172: invokevirtual 410	org/json/JSONObject:getLong	(Ljava/lang/String;)J
    //   175: ldc2_w 411
    //   178: ldiv
    //   179: lstore 22
    //   181: lload 22
    //   183: lload 7
    //   185: lcmp
    //   186: ifeq +18 -> 204
    //   189: iinc 12 1
    //   192: goto -62 -> 130
    //   195: astore_3
    //   196: ldc 96
    //   198: aload_3
    //   199: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   202: pop
    //   203: return
    //   204: aload 20
    //   206: aload 5
    //   208: invokevirtual 81	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   211: ifeq -22 -> 189
    //   214: aload 21
    //   216: aload 6
    //   218: invokevirtual 81	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   221: ifeq -32 -> 189
    //   224: aload_1
    //   225: ldc 125
    //   227: invokevirtual 420	org/json/JSONObject:getInt	(Ljava/lang/String;)I
    //   230: istore 24
    //   232: aload 19
    //   234: ldc 125
    //   236: invokevirtual 420	org/json/JSONObject:getInt	(Ljava/lang/String;)I
    //   239: istore 25
    //   241: iload 25
    //   243: iload 24
    //   245: iadd
    //   246: istore 26
    //   248: aload 19
    //   250: ldc 125
    //   252: invokevirtual 423	org/json/JSONObject:remove	(Ljava/lang/String;)Ljava/lang/Object;
    //   255: pop
    //   256: aload 19
    //   258: ldc 125
    //   260: iload 26
    //   262: invokevirtual 320	org/json/JSONObject:put	(Ljava/lang/String;I)Lorg/json/JSONObject;
    //   265: pop
    //   266: iload 12
    //   268: istore 13
    //   270: goto -81 -> 189
    //   273: astore 17
    //   275: ldc 96
    //   277: aload 17
    //   279: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   282: pop
    //   283: goto -94 -> 189
    //   286: astore 10
    //   288: aload 9
    //   290: monitorexit
    //   291: aload 10
    //   293: athrow
    //   294: iload 13
    //   296: iload 11
    //   298: if_icmpge +7 -> 305
    //   301: aload 9
    //   303: monitorexit
    //   304: return
    //   305: aload_0
    //   306: getfield 65	com/baidu/mobstat/b:s	Lorg/json/JSONArray;
    //   309: iload 11
    //   311: aload_1
    //   312: invokevirtual 349	org/json/JSONArray:put	(ILjava/lang/Object;)Lorg/json/JSONArray;
    //   315: pop
    //   316: aload 9
    //   318: monitorexit
    //   319: return
    //   320: astore 14
    //   322: ldc 96
    //   324: aload 14
    //   326: invokestatic 134	com/baidu/mobstat/a/b:a	(Ljava/lang/String;Ljava/lang/Throwable;)I
    //   329: pop
    //   330: goto -14 -> 316
    //   333: astore 27
    //   335: aload 27
    //   337: astore 17
    //   339: iload 12
    //   341: istore 13
    //   343: goto -68 -> 275
    //
    // Exception table:
    //   from	to	target	type
    //   75	105	195	org/json/JSONException
    //   137	181	273	org/json/JSONException
    //   204	241	273	org/json/JSONException
    //   114	123	286	finally
    //   137	181	286	finally
    //   204	241	286	finally
    //   248	266	286	finally
    //   275	283	286	finally
    //   288	291	286	finally
    //   301	304	286	finally
    //   305	316	286	finally
    //   316	319	286	finally
    //   322	330	286	finally
    //   305	316	320	org/json/JSONException
    //   248	266	333	org/json/JSONException
  }

  public void c(Context paramContext)
  {
    com.baidu.mobstat.a.b.a("stat", "LoadLastSession()");
    if (paramContext == null);
    do
      return;
    while (!a.c(paramContext, "__local_last_session.json"));
    String str = a.a(false, paramContext, "__local_last_session.json");
    if (str.equals(""))
    {
      com.baidu.mobstat.a.b.a("stat", "loadLastSession(): last_session.json file not found.");
      return;
    }
    a.a(false, paramContext, "__local_last_session.json", new JSONObject().toString(), false);
    c(str);
    b(paramContext);
  }

  public void c(String paramString)
  {
    if ((paramString.equals("{}")) || (paramString.equals("")))
      return;
    try
    {
      JSONObject localJSONObject = new JSONObject(paramString);
      a(localJSONObject, false);
      com.baidu.mobstat.a.b.a("stat", "Load last session:" + localJSONObject);
      return;
    }
    catch (JSONException localJSONException)
    {
      com.baidu.mobstat.a.b.a("stat", "putSession()" + localJSONException);
    }
  }

  public void c(JSONObject paramJSONObject, boolean paramBoolean)
  {
    if ((paramJSONObject != null) && (!paramBoolean))
    {
      int i2 = paramJSONObject.toString().getBytes().length;
      Object[] arrayOfObject = new Object[3];
      arrayOfObject[0] = "stat";
      arrayOfObject[1] = "putException:addSize is:";
      arrayOfObject[2] = Integer.valueOf(i2);
      com.baidu.mobstat.a.b.a(arrayOfObject);
      if (i2 + this.p > 204800)
      {
        com.baidu.mobstat.a.b.a("stat", "putException: size is full!");
        return;
      }
    }
    int i1;
    synchronized (this.u)
    {
      i1 = this.u.length();
    }
    try
    {
      this.u.put(i1, paramJSONObject);
      monitorexit;
      return;
      localObject = finally;
      monitorexit;
      throw localObject;
    }
    catch (JSONException localJSONException)
    {
      com.baidu.mobstat.a.b.a("stat", localJSONException);
    }
  }

  public boolean c()
  {
    return (this.r.length() == 0) && (this.s.length() == 0) && (this.u.length() == 0);
  }

  public void d(Context paramContext)
  {
    int i1 = 0;
    if (paramContext == null);
    do
      return;
    while (!a.c(paramContext, "__local_stat_cache.json"));
    String str = a.a(false, paramContext, "__local_stat_cache.json");
    if (str.equals(""))
    {
      com.baidu.mobstat.a.b.a("stat", "stat_cache file not found.");
      return;
    }
    com.baidu.mobstat.a.b.a("stat", "loadStatData, ");
    JSONObject localJSONObject1;
    long l1;
    int i2;
    try
    {
      this.p = str.getBytes().length;
      com.baidu.mobstat.a.b.a("stat", "load Stat Data:cacheFileSize is:" + this.p);
      localJSONObject1 = new JSONObject(str);
      com.baidu.mobstat.a.b.a("stat", "Load cache:" + str);
      l1 = System.currentTimeMillis();
      JSONArray localJSONArray1 = localJSONObject1.getJSONArray("pr");
      i2 = 0;
      label146: if (i2 >= localJSONArray1.length())
        break label226;
      JSONObject localJSONObject4 = localJSONArray1.getJSONObject(i2);
      if (l1 - localJSONObject4.getLong("s") <= 604800000L)
        a(localJSONObject4, true);
    }
    catch (JSONException localJSONException)
    {
      com.baidu.mobstat.a.b.a("stat", "Load stat data error:" + localJSONException);
      return;
    }
    label226: JSONArray localJSONArray2 = localJSONObject1.getJSONArray("ev");
    int i3 = 0;
    JSONArray localJSONArray3;
    if (i3 < localJSONArray2.length())
    {
      JSONObject localJSONObject3 = localJSONArray2.getJSONObject(i3);
      if (l1 - localJSONObject3.getLong("t") <= 604800000L)
        b(localJSONObject3, true);
    }
    else
    {
      localJSONArray3 = localJSONObject1.getJSONArray("ex");
    }
    while (true)
    {
      if (i1 < localJSONArray3.length());
      JSONObject localJSONObject2 = localJSONArray3.getJSONObject(i1);
      if (l1 - localJSONObject2.getLong("t") <= 604800000L)
      {
        c(localJSONObject2, true);
        break label357:
        ++i2;
        break label146:
        ++i3;
      }
      label357: ++i1;
    }
  }
}

/* Location:           C:\Users\god\Desktop\liunianjishiben_V1.1_mumayi_3745b_dex2jar.jar
 * Qualified Name:     com.baidu.mobstat.b
 * JD-Core Version:    0.5.4
 */